/**
 * 研发常量配置文件
 * 统一导出研发流程状态机相关常量
 */

// 导入研发流程状态机常量
const constants = require('../store/modules/research/state_machine/constants.js');

// 创建一个新的对象，避免直接修改导入的常量
const research_constants = {
  // 集合名称
  COLLECTION_NAMES: constants.COLLECTION_NAMES,
  
  // 项目状态
  PROJECT_STATUS: constants.PROJECT_STATUS,
  PROJECT_REVIEW_SUB_STATUS: constants.PROJECT_REVIEW_SUB_STATUS,
  DORMANT_SUB_STATUS: constants.DORMANT_SUB_STATUS,
  
  // 活动状态
  ACTIVE_STATE: constants.ACTIVE_STATE,
  HARDWARE_SUB_STATE: constants.HARDWARE_SUB_STATE,
  TESTING_SUB_STATE: constants.TESTING_SUB_STATE,
  CUSTOMER_CONFIRM_SUB_STATE: constants.CUSTOMER_CONFIRM_SUB_STATE,
  ORDER_PREPARATION_SUB_STATE: constants.ORDER_PREPARATION_SUB_STATE,
  PRODUCTION_SUB_STATE: constants.PRODUCTION_SUB_STATE,
  
  // 项目分类和优先级
  PROJECT_CATE: constants.PROJECT_CATE,
  PROJECT_PRIORITY: constants.PROJECT_PRIORITY,
  
  // 子状态
  SUB_STATE: constants.SUB_STATE,
  
  // 状态事件
  STATE_EVENTS: constants.STATE_EVENTS,
  
  // 状态与角色权限映射
  STATUS_ROLE_PERMISSIONS: constants.STATUS_ROLE_PERMISSIONS,
  
  // 项目模式定义
  PROJECT_SCHEMA: {
    // 基础标识信息
    id: 'string|true',                   // 唯一标识（原_id）
    model: 'string|true|comment=型号',  
    projectType: 'string|true|default=霍尔|comment=项目类型',  
    customerName: 'string|true|comment=客户名称',  
    startDate: 'int|true|comment=开始日期',  
    deadline: 'int|true|comment=截止日期',  
    priority: 'string|true|default=normal|comment=优先级', 
    description: 'string|false|comment=项目描述',
    
    // 状态字段
    level1: 'int|true|default=0|comment=一级状态',  
    level2: 'string|false|comment=二级状态',  
    level3: 'string|false|comment=三级状态',  
    level4: 'string|false|comment=四级状态',
  
    // 其他必要字段
    createTime: 'int|true|comment=创建时间',  
    updateTime: 'int|true|comment=更新时间',
    statusDesc: 'string|true|comment=状态描述'
  }
};

// 导出所有常量
module.exports = research_constants; 